FLAGS = -Wall -g -std=c++17
CC = g++

xiangqi : xiangqi.o service.o search.o eval.o
	$(CC) $(FLAGS) xiangqi.o service.o search.o eval.o -lpistache -lssl -lcrypto -pthread -o xiangqi

xiangqi.o : xiangqi.cpp service.h
	$(CC) $(FLAGS) -c xiangqi.cpp

service.o : service.cpp service.h
	$(CC) $(FLAGS) -c service.cpp

search.o : search.cpp search.h eval.h
	$(CC) $(FLAGS) -c search.cpp

eval.o : eval.cpp eval.h
	$(CC) $(FLAGS) -c eval.cpp


.PHONY : clean
clean :
	rm *.o xiangqi
